Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

deCamera Class Reference

#include <deCamera_priv.hpp>

Inheritance diagram for deCamera:

Inheritance graph
[legend]
Collaboration diagram for deCamera:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 deCamera (void)
 deCamera (const deCamera &ref)
 ~deCamera (void)
long Release ()
 deletes the object

void SetWindow (HWND window)
 Match the camera with a window handle. Multiple cameras may share a window handle.

void SetRect (deRect rect)
 Set the client rect of the camera's viewport, which the scene will be rendered into.

void SetFOV (deDouble Degrees)
 Set the horizontal Field-of-View of the camera, in degrees.

void SetScreenAspect (long PixelWidth, long PixelHeight, deDouble AspectRatio)
 Set the screen aspect ratio (AspectRatio = 4/3 or 16/9, defaults to 4/3).

void SetClip (deDouble Near, deDouble Far)
 Set the near and far clip planes of the camera's viewport.

void FogEnable (deBoolean Enable)
void SetFog (deFloat Near, deFloat Far, deARGB Color, deBoolean RangeFog)
void SetOrthoWidth (deDouble Width)
 Set the width of the camera, if it will be an orthographic projection.

void EnableOrtho (deBoolean OrthoEnable)
 Enable or disable an orthographic (parallel) projection mode.

deBoolean BuildRootFrustum (IdePlaneFrustum *pFrustum)
 Build a frustum from this camera based on its rect and transform.

deVec3d ScreenPointToWorldVec (int x, int y, deVec3d *StartPosition)
deBoolean WorldPosToScreenPos (const deVec3d &pos, int &x, int &y)
 Transforms a 3D world position into an (x,y) pair on the screen.

deBoolean FrustumRect (const IdePlaneFrustum *f, deRect &r)
HWND GetWindow ()
 Retrieve the associated window handle.

deRect GetRect ()
 Retrieve the screenrect the camera is using.

deDouble GetFOV ()
 Retrieve the horizontal Field-of-View of the camera, in degrees.

deDouble GetFOVy (deDouble &Aspect)
deDouble GetNearClip ()
 Retrieve the near clip plane distance.

deDouble GetFarClip ()
 Retrieve the far clip plane distance.

deDouble GetOrthoWidth ()
 Retrieve the orthogrpahic width of the camera.

deBoolean IsOrtho ()
deBoolean GetFog (deFloat &Near, deFloat &Far, deARGB &Color, deBoolean &RangeFog)
void LockAspect (deDouble Aspect)
deTransformInfoPosition ()

Private Attributes

HWND m_hWnd
deBoolean m_IsOrtho
deBoolean m_FogEnable
deBoolean m_RangeFog
deBoolean m_AspectLocked
deARGB m_FogColor
deFloat m_NearFog
deFloat m_FarFog
deDouble m_OrthoWidth
deDouble m_NearClip
deDouble m_FarClip
deDouble m_FOV
deDouble m_FOVy
deDouble m_LastAspect
deDouble m_PixelAspect
deRect m_Viewport
deTransform m_Position

Constructor & Destructor Documentation

deCamera::deCamera void   
 

deCamera::deCamera const deCamera &    ref
 

deCamera::~deCamera void   
 


Member Function Documentation

deBoolean deCamera::BuildRootFrustum IdePlaneFrustum   pFrustum [virtual]
 

Build a frustum from this camera based on its rect and transform.

Implements IdeCamera.

void deCamera::EnableOrtho deBoolean    OrthoEnable [virtual]
 

Enable or disable an orthographic (parallel) projection mode.

Implements IdeCamera.

void deCamera::FogEnable deBoolean    Enable [virtual]
 

Implements IdeCamera.

deBoolean deCamera::FrustumRect const IdePlaneFrustum   f,
deRect   r
[virtual]
 

Clips a screen rect to the input frustum

Returns:
deTrue if successful, deFalse otherwise
Parameters:
Frustum a valid deFrustum object to be used in clipping a screen-rect
ScreenRect a deRect filled with valid screen positions, to be clipped down to the screen-size of Frustum

Implements IdeCamera.

deDouble deCamera::GetFarClip   [virtual]
 

Retrieve the far clip plane distance.

Implements IdeCamera.

deBoolean deCamera::GetFog deFloat   Near,
deFloat   Far,
deARGB   Color,
deBoolean   RangeFog
[virtual]
 

Implements IdeCamera.

deDouble deCamera::GetFOV   [virtual]
 

Retrieve the horizontal Field-of-View of the camera, in degrees.

Implements IdeCamera.

deDouble deCamera::GetFOVy deDouble   Aspect [virtual]
 

Retrieve the vertical Field-of-View of the camera, in radians

Parameters:
Aspect the aspect ratio of the viewport being used. (Aspect = Width/Height). This will be filled with the current "Locked" Aspect if one is set

Implements IdeCamera.

deDouble deCamera::GetNearClip   [virtual]
 

Retrieve the near clip plane distance.

Implements IdeCamera.

deDouble deCamera::GetOrthoWidth   [virtual]
 

Retrieve the orthogrpahic width of the camera.

Implements IdeCamera.

deRect deCamera::GetRect   [virtual]
 

Retrieve the screenrect the camera is using.

Implements IdeCamera.

HWND deCamera::GetWindow   [virtual]
 

Retrieve the associated window handle.

Implements IdeCamera.

deBoolean deCamera::IsOrtho   [virtual]
 

Tell whether the camera is using an orthographic projection or not

Returns:
deTrue if an orthographic projection is in use

Implements IdeCamera.

void deCamera::LockAspect deDouble    Aspect [virtual]
 

Used to lock the aspect of a camera in order to cause a distorted image to render. The return value from GetFOVy will be unaffected by the Aspect actually fed to it.

Parameters:
Aspect An aspect ratio to lock the camera into using. Use a negative value to unlock.

Implements IdeCamera.

deTransformInfo & deCamera::Position   [virtual]
 

The current transformation of the camera

Returns:
a reference to the camera's internal transform, instead of a Get/Set pair.

Implements IdeCamera.

long deCamera::Release   [virtual]
 

deletes the object

Implements IdeCamera.

deVec3d deCamera::ScreenPointToWorldVec int    x,
int    y,
deVec3d   StartPosition
[virtual]
 

Retrieve a vector in world-space corresponding to a screen position.

Returns:
a vector (with Z=1) pointing from the camera's translation along the ray that coincides with the point selected on the near clip plane
Parameters:
a pointer to a vector in which to store the start point of the ray

Implements IdeCamera.

void deCamera::SetClip deDouble    Near,
deDouble    Far
[virtual]
 

Set the near and far clip planes of the camera's viewport.

Implements IdeCamera.

void deCamera::SetFog deFloat    Near,
deFloat    Far,
deARGB    Color,
deBoolean    RangeFog
[virtual]
 

Implements IdeCamera.

void deCamera::SetFOV deDouble    Degrees [virtual]
 

Set the horizontal Field-of-View of the camera, in degrees.

Implements IdeCamera.

void deCamera::SetOrthoWidth deDouble    Width [virtual]
 

Set the width of the camera, if it will be an orthographic projection.

Implements IdeCamera.

void deCamera::SetRect deRect    rect [virtual]
 

Set the client rect of the camera's viewport, which the scene will be rendered into.

Implements IdeCamera.

void deCamera::SetScreenAspect long    PixelWidth,
long    PixelHeight,
deDouble    AspectRatio
[virtual]
 

Set the screen aspect ratio (AspectRatio = 4/3 or 16/9, defaults to 4/3).

Implements IdeCamera.

void deCamera::SetWindow HWND    window [virtual]
 

Match the camera with a window handle. Multiple cameras may share a window handle.

Implements IdeCamera.

deBoolean deCamera::WorldPosToScreenPos const deVec3d   pos,
int &    x,
int &    y
[virtual]
 

Transforms a 3D world position into an (x,y) pair on the screen.

Implements IdeCamera.


Member Data Documentation

deBoolean deCamera::m_AspectLocked [private]
 

deDouble deCamera::m_FarClip [private]
 

deFloat deCamera::m_FarFog [private]
 

deARGB deCamera::m_FogColor [private]
 

deBoolean deCamera::m_FogEnable [private]
 

deDouble deCamera::m_FOV [private]
 

deDouble deCamera::m_FOVy [private]
 

HWND deCamera::m_hWnd [private]
 

deBoolean deCamera::m_IsOrtho [private]
 

deDouble deCamera::m_LastAspect [private]
 

deDouble deCamera::m_NearClip [private]
 

deFloat deCamera::m_NearFog [private]
 

deDouble deCamera::m_OrthoWidth [private]
 

deDouble deCamera::m_PixelAspect [private]
 

deTransform deCamera::m_Position [private]
 

deBoolean deCamera::m_RangeFog [private]
 

deRect deCamera::m_Viewport [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Sep 12 20:13:31 2005 for Destiny3D by doxygen1.3-rc3